import request from '@/utils/request'

// 添加地址
export function addAddress(data) {
  return request({
    url: '/member/receiveAddress',
    method: 'post',
    data
  })
}
// 修改地址
export function updateAddress(data) {
  return request({
    url: '/member/receiveAddress',
    method: 'put',
    data
  })
}
// 删除地址
export function deleteAddress(id) {
  return request({
    url: '/member/receiveAddress/' + id,
    method: 'delete'
  })
}
// 查询地址列表
export function listAddress () {
	return request({
		url: '/member/receiveAddress/currentUser',
		method: 'get'
	})
}

// 获取地址详情
export function getAddress(id) {
	return request({
		url: '/member/receiveAddress/' + id,
		method: 'get'
	})
}
